﻿<?xml version="1.0" encoding="utf-8"?>
<Witd:WITD application="Work item type editor" version="1.0" xmlns:Witd="http://schemas.microsoft.com/VisualStudio/2008/workitemtracking/typedef">
  <WORKITEMTYPE name="Feedback">
    <DESCRIPTION>Feedback WorkItem</DESCRIPTION>
    <FIELDS>
      <FIELD name="Title" refname="System.Title" type="String" reportable="dimension">
        <REQUIRED />
        <HELPTEXT>One line summary of the feedback submitted</HELPTEXT>
      </FIELD>
      <FIELD name="State" refname="System.State" type="String" reportable="dimension">
        <HELPTEXT>Current status of the feedback</HELPTEXT>
      </FIELD>
      <FIELD name="Rev" refname="System.Rev" type="Integer" reportable="dimension" />
      <FIELD name="Changed By" refname="System.ChangedBy" type="String" syncnamechanges="true" reportable="dimension">
        <ALLOWEXISTINGVALUE />
        <VALIDUSER />
        <HELPTEXT>Last person who updated the feedback</HELPTEXT>
      </FIELD>
      <FIELD name="Reason" refname="System.Reason" type="String" reportable="dimension">
        <HELPTEXT>Specifies the reason for the latest state transition of the workitem</HELPTEXT>
      </FIELD>
      <FIELD name="Assigned To" refname="System.AssignedTo" type="String" syncnamechanges="true" reportable="dimension">
        <ALLOWEXISTINGVALUE />
        <VALIDUSER />
        <HELPTEXT>Person responsible for next set of actions on the feedback</HELPTEXT>
      </FIELD>
      <FIELD name="Work Item Type" refname="System.WorkItemType" type="String" reportable="dimension" />
      <FIELD name="Created Date" refname="System.CreatedDate" type="DateTime" reportable="dimension" />
      <FIELD name="Created By" refname="System.CreatedBy" type="String" syncnamechanges="true" reportable="dimension" />
      <FIELD name="Submitted By" refname="Microsoft.VSTS.Common.SubmittedBy" type="String" reportable="dimension">
        <WHENNOTCHANGED field="System.State">
          <READONLY />
        </WHENNOTCHANGED>
        <ALLOWEXISTINGVALUE />
        <HELPTEXT>Person who submitted the feedback</HELPTEXT>
      </FIELD>
      <FIELD name="History" refname="System.History" type="History">
        <HELPTEXT>Discussion thread plus automatic record of changes</HELPTEXT>
      </FIELD>
      <FIELD name="Submitted Date" refname="Microsoft.VSTS.Common.SubmittedDate" type="DateTime" reportable="dimension">
        <WHENNOTCHANGED field="System.State">
          <READONLY />
        </WHENNOTCHANGED>
        <HELPTEXT>Date when the feedback was submitted</HELPTEXT>
      </FIELD>
      <FIELD name="Rating" refname="Microsoft.VSTS.Common.Rating" type="String" reportable="dimension">
        <ALLOWEDVALUES>
          <LISTITEM value="0 - Not Rated" />
          <LISTITEM value="1 - Poor" />
          <LISTITEM value="2 - Fair" />
          <LISTITEM value="3 - Good" />
          <LISTITEM value="4 - Very Good" />
          <LISTITEM value="5 - Excellent" />
        </ALLOWEDVALUES>
        <DEFAULT from="value" value="0 - Not Rated" />
        <HELPTEXT>Overall rating provided as part of feedback</HELPTEXT>
      </FIELD>
      <FIELD name="Requested By" refname="Microsoft.VSTS.Common.RequestedBy" type="String" reportable="dimension">
        <WHENNOTCHANGED field="System.State">
          <READONLY />
        </WHENNOTCHANGED>
        <ALLOWEXISTINGVALUE />
        <HELPTEXT>Person who requested the feedback</HELPTEXT>
        <VALIDUSER />
      </FIELD>
      <FIELD name="Submitted Notes" refname="Microsoft.VSTS.Common.SubmittedNotes" type="HTML">
        <HELPTEXT>Notes captured as part of the feedback</HELPTEXT>
      </FIELD>
      <FIELD name="Reviewed Date" refname="Microsoft.VSTS.Common.ReviewedDate" type="DateTime">
        <WHENNOTCHANGED field="System.State">
          <READONLY />
        </WHENNOTCHANGED>
        <HELPTEXT>Date when the feedback was reviewed</HELPTEXT>
      </FIELD>
      <FIELD name="Reviewed By" refname="Microsoft.VSTS.Common.ReviewedBy" type="String">
        <WHENNOTCHANGED field="System.State">
          <READONLY />
        </WHENNOTCHANGED>
        <ALLOWEXISTINGVALUE />
        <HELPTEXT>Person who reviewed the feedback</HELPTEXT>
        <VALIDUSER />
      </FIELD>
      <FIELD name="Iteration Path" refname="System.IterationPath" type="TreePath" reportable="dimension">
        <HELPTEXT>The iteration within which this feedback applies</HELPTEXT>
      </FIELD>
      <FIELD name="Team Project" refname="System.TeamProject" type="String" reportable="dimension" />
      <FIELD name="Node Name" refname="System.NodeName" type="String" />
      <FIELD name="Area Path" refname="System.AreaPath" type="TreePath" reportable="dimension">
        <HELPTEXT>The area of the product with which this feedback is associated</HELPTEXT>
      </FIELD>
      <FIELD name="Revised Date" refname="System.RevisedDate" type="DateTime" reportable="detail" />
      <FIELD name="Changed Date" refname="System.ChangedDate" type="DateTime" reportable="dimension">
        <HELPTEXT>Date when the feedback was last changed</HELPTEXT>
      </FIELD>
      <FIELD name="Id" refname="System.Id" type="Integer" reportable="dimension" />
      <FIELD name="Rating Comments" refname="Microsoft.VSTS.Common.RatingComments" type="PlainText">
        <HELPTEXT>Comments given along with the rating</HELPTEXT>
      </FIELD>
      <FIELD name="System Info" refname="Microsoft.VSTS.TCM.SystemInfo" type="HTML" >
        <HELPTEXT>Test context, provided automatically by test infrastructure</HELPTEXT>
      </FIELD>
      <!-- **************** Team Build Integration Fields **************  -->
      <FIELD name="Integration Build" refname="Microsoft.VSTS.Build.IntegrationBuild" type="String" reportable="dimension">
        <HELPTEXT>The build in which the bug was fixed</HELPTEXT>
        <SUGGESTEDVALUES>
          <LISTITEM value="&lt;None&gt;" />
        </SUGGESTEDVALUES>
      </FIELD>
    </FIELDS>
    <WORKFLOW>
      <!-- The states are not localized now as they have a strong semantics associated with them. This 
      needs to be redone once we bring in the semantics layer to handle this.
      -->
      <STATES>
        <STATE value="Pending">
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.RequestedBy">
              <ALLOWEXISTINGVALUE />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ReviewedBy">
              <EMPTY />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ReviewedDate">
              <EMPTY />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.SubmittedBy">
              <EMPTY />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.SubmittedDate">
              <EMPTY />
            </FIELD>
          </FIELDS>
        </STATE>
        <STATE value="Submitted">
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.RequestedBy">
              <ALLOWEXISTINGVALUE />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ReviewedBy">
              <EMPTY />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ReviewedDate">
              <EMPTY />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.SubmittedBy">
              <REQUIRED />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.SubmittedDate">
              <REQUIRED />
            </FIELD>
          </FIELDS>
        </STATE>
        <STATE value="Reviewed">
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.RequestedBy">
              <ALLOWEXISTINGVALUE />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ReviewedBy">
              <REQUIRED />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ReviewedDate">
              <REQUIRED />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.SubmittedBy">
              <ALLOWEXISTINGVALUE />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.SubmittedDate">
              <ALLOWEXISTINGVALUE />
            </FIELD>
          </FIELDS>
        </STATE>
        <STATE value="Declined">
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.RequestedBy">
              <ALLOWEXISTINGVALUE />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ReviewedBy">
              <EMPTY />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ReviewedDate">
              <EMPTY />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.SubmittedBy">
              <EMPTY />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.SubmittedDate">
              <EMPTY />
            </FIELD>
          </FIELDS>
        </STATE>
      </STATES>
      <TRANSITIONS>
        <TRANSITION from="" to="Submitted">
          <REASONS>
            <DEFAULTREASON value="Submitted" />
          </REASONS>
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.SubmittedBy">
              <COPY from="currentuser" />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.SubmittedDate">
              <COPY from="clock" />
            </FIELD>
          </FIELDS>
        </TRANSITION>
        <TRANSITION from="Submitted" to="Pending">
          <REASONS>
            <DEFAULTREASON value="Pending" />
          </REASONS>
        </TRANSITION>
        <TRANSITION from="Pending" to="Submitted">
          <REASONS>
            <DEFAULTREASON value="Submitted" />
          </REASONS>
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.SubmittedBy">
              <COPY from="currentuser" />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.SubmittedDate">
              <COPY from="clock" />
            </FIELD>
          </FIELDS>
        </TRANSITION>
        <TRANSITION from="Submitted" to="Reviewed">
          <REASONS>
            <DEFAULTREASON value="Reviewed" />
          </REASONS>
          <FIELDS>
            <FIELD refname="Microsoft.VSTS.Common.ReviewedBy">
              <COPY from="currentuser" />
            </FIELD>
            <FIELD refname="Microsoft.VSTS.Common.ReviewedDate">
              <COPY from="clock" />
            </FIELD>
          </FIELDS>
        </TRANSITION>
        <TRANSITION from="Pending" to="Declined">
          <REASONS>
            <DEFAULTREASON value="Declined" />
          </REASONS>
        </TRANSITION>
      </TRANSITIONS>
    </WORKFLOW>
    <FORM>
      <Layout HideReadOnlyEmptyFields="true" HideControlBorders="true">
        <Group Margin="(0,0,0,5)">
          <Column PercentWidth="100">
            <Control FieldName="System.Title" Type="FieldControl" ControlFontSize="large" EmptyText="&lt;Enter title here&gt;" />
          </Column>
        </Group>
        <Group>
          <Column PercentWidth="70">
            <TabGroup>
              <Tab Label="Notes">
                <Control FieldName="Microsoft.VSTS.Common.SubmittedNotes" Type="HtmlFieldControl" Label="&amp;Notes" LabelPosition="Top" Dock="Left" />
              </Tab>
              <Tab Label="Stories">
                <Control Type="LinksControl" Name="Feedback On" Label="Stories related to this feedback:" LabelPosition="Top">
                  <LinksControlOptions>
                    <WorkItemLinkFilters FilterType="include">
                      <Filter LinkType="Microsoft.VSTS.Common.Feedback" FilterOn="reversename" />
                      <Filter LinkType="System.LinkTypes.Related" />
                    </WorkItemLinkFilters>
                    <WorkItemTypeFilters FilterType="include">
                      <Filter WorkItemType="User Story" />
                    </WorkItemTypeFilters>
                    <ExternalLinkFilters FilterType="excludeAll" />
                    <LinkColumns>
                      <LinkColumn RefName="System.Id" />
                      <LinkColumn RefName="System.WorkItemType" />
                      <LinkColumn RefName="System.Title" />
                      <LinkColumn RefName="System.AssignedTo" />
                      <LinkColumn RefName="System.State" />
                      <LinkColumn LinkAttribute="System.Links.Comment" />
                    </LinkColumns>
                  </LinksControlOptions>
                </Control>
              </Tab>
              <Tab Label="System Info">
                <Control FieldName="Microsoft.VSTS.TCM.SystemInfo" Type="HtmlFieldControl" Label="System I&amp;nfo:" LabelPosition="Top" Dock="Fill" />
              </Tab>
              <Tab Label="All Links">
                <Control Type="LinksControl" Label="All Lin&amp;ks" LabelPosition="Top">
                  <LinksControlOptions>
                    <LinkColumns>
                      <LinkColumn RefName="System.Id" />
                      <LinkColumn RefName="System.Title" />
                      <LinkColumn RefName="System.AssignedTo" />
                      <LinkColumn RefName="System.State" />
                      <LinkColumn LinkAttribute="System.Links.Comment" />
                    </LinkColumns>
                    <WorkItemLinkFilters FilterType="includeAll" />
                    <ExternalLinkFilters FilterType="includeAll" />
                    <WorkItemTypeFilters FilterType="includeAll" />
                  </LinksControlOptions>
                </Control>
              </Tab>
              <Tab Label="Attachments">
                <Control Type="AttachmentsControl" Label="Attach&amp;ments" LabelPosition="Top" Dock="Fill" />
              </Tab>
              <Tab Label="History">
                <Control Type="WorkItemLogControl" Label="&amp;History" LabelPosition="Top" FieldName="System.History" />
              </Tab>
            </TabGroup>
          </Column>
          <Column PercentWidth="30">
            <Group Margin="(5,0,0,0)">
              <Column PercentWidth="100">
                <Group Label="Status">
                  <Column PercentWidth="100">
                    <Control FieldName="System.AssignedTo" Type="FieldControl" EmptyText="&lt;No one&gt;" Label="&amp;Assigned To:" LabelPosition="Left" />
                    <Control FieldName="System.State" Type="FieldControl" Label="&amp;State:" LabelPosition="Left" />
                  </Column>
                </Group>
                <Group Label="Workflow">
                  <Column PercentWidth="100">
                    <Control FieldName="Microsoft.VSTS.Common.RequestedBy" Type="FieldControl" Label="Re&amp;quested By:" LabelPosition="Left" />
                    <Control FieldName="Microsoft.VSTS.Common.SubmittedBy" Type="FieldControl" Label="Su&amp;bmitted By:" LabelPosition="Left" />
                    <Control FieldName="Microsoft.VSTS.Common.ReviewedBy" Type="FieldControl" Label="Re&amp;viewed By:" LabelPosition="Left" />
                  </Column>
                </Group>
                <Group Label="Rating">
                  <Column PercentWidth="100">
                    <Control FieldName="Microsoft.VSTS.Common.Rating" Type="FieldControl" Label="&amp;Level:" LabelPosition="Top" />
                    <Control FieldName="Microsoft.VSTS.Common.RatingComments" Type="HtmlFieldControl" Label="Co&amp;mments:" LabelPosition="Top" />
                  </Column>
                </Group>
                <Group Label="Classification">
                  <Column PercentWidth="100">
                    <Control FieldName="System.AreaPath" Type="WorkItemClassificationControl" Label="Ar&amp;ea:" LabelPosition="Left" />
                    <Control FieldName="System.IterationPath" Type="WorkItemClassificationControl" Label="&amp;Iteration:" LabelPosition="Left" />
                  </Column>
                </Group>
              </Column>
            </Group>
          </Column>
        </Group>
      </Layout>
    </FORM>
  </WORKITEMTYPE>
</Witd:WITD>
